<?php

namespace app\model;

use think\Model;

class Role extends Model
{
    protected $pk = 'role_id';
    protected $table = 'aya_role';

    public function getRoleStatusTextAttr($value, $data)
    {
        $status = [-1 => '删除' ,0 => '禁用', 1 => '启用'];
        return $status[$data['role_status']];
    }
}